package com.sky.controller.practice;

import com.sky.model.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/practice")
public class PracticeController {

    @PostMapping("/form")
    public String form(User user, MultipartFile avatar) {
        System.out.println("user = " + user);
        System.out.println("avatar = " + avatar.getOriginalFilename());
        return user.toString();
    }

}
